* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

#app {
  max-width: 600px;
  margin: 0 auto;
}

.container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  padding: 30px;
  text-align: center;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  opacity: 0.9;
  font-size: 1.1rem;
}

.main {
  padding: 30px;
}

/* 添加任务表单 */
.add-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.todo-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.todo-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.add-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.add-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.add-icon {
  font-size: 18px;
  font-weight: bold;
}

/* 统计信息 */
.todo-stats {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #64748b;
}

/* 过滤按钮 */
.todo-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  flex: 1;
  padding: 10px;
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active {
  background: #4f46e5;
  color: white;
}

.filter-btn:hover:not(.active) {
  background: #e2e8f0;
}

/* 任务项 */
.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.todo-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
  opacity: 0.7;
  background: #f8fafc;
}

.todo-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.todo-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
}

.todo-text {
  flex: 1;
  cursor: pointer;
}

.todo-item.completed .text {
  text-decoration: line-through;
  color: #94a3b8;
}

.text {
  font-size: 16px;
  line-height: 1.5;
}

.todo-time {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

.edit-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #4f46e5;
  border-radius: 4px;
  font-size: 16px;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.delete-btn:hover {
  background: #fef2f2;
  transform: scale(1.1);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.empty-hint {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.7;
}

/* 动画效果 */
.todo-enter-active,
.todo-leave-active {
  transition: all 0.5s ease;
}

.todo-enter-from {
  opacity: 0;
  transform: translateX(-30px);
}

.todo-leave-to {
  opacity: 0;
  transform: translateX(30px);
}

.todo-move {
  transition: transform 0.5s ease;
}

/* 响应式设计 */
@media (max-width: 640px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 20px;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .main {
    padding: 20px;
  }
  
  .add-form {
    flex-direction: column;
  }
  
  .todo-stats {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}